package com.itheima.zifu;

import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.nio.charset.Charset;

/*
字符流读数据
 */
public class Demo06 {
    public static void main(String[] args) throws IOException {

        FileReader reader = new FileReader("day13\\aaa\\a.txt");
       // FileReader reader = new FileReader(new File("day13\\aaa\\a.txt"));
      // FileReader reader = new FileReader("day13\\aaa\\a.txt", Charset.forName("gbk"));
       /* while (true) {
            int c = reader.read();
            System.out.println(c);
            if(c==-1){
                break;
            }
        }*/
       int c;
       while ((c=reader.read())!=-1){
           System.out.println((char)c);
       }
        reader.close();
    }
}
